<%@page contentType="text/html;charset=utf-8"%>
<%@page import="javabean.UserInfo"%>
<%@page import="javabean.Col" %>
<%@page import="util.Constant"%>
<%@page import="util.PubFun"%>
<%/***************session fail****************************/
	UserInfo userInfo = (UserInfo)session.getAttribute("userInfo");
	if (userInfo == null) {
		response.sendRedirect(request.getContextPath() + Constant.ORGINAL_LOGIN_PAGE);
		return;		
	}
	Col[] cols = (Col[])request.getAttribute("cols");%>
<input type="hidden" id="col_parentId" value="<%=request.getAttribute("parentId") %>"></input>
<!--main div begin-->
<!--[if lte IE 6]><div id="maindiv" class="maindivie6"><![endif]-->
<!--[if gte IE 7]><!--><div id="maindiv" class="maindivelse"><!--<![endif]-->   
	<span class="linktextbutton">
		<span>当前的位置：栏目管理</span>
	</span>
	<div class="viewfirst" onmouseout="ViewShowFirst(this);" onmouseover="ViewShowSecond(this);">
		<!--keboardfirst begin-->
		<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
			<div class="keyboardfirst" onmouseout="KeyboardShowFirst(this);" onmouseover="KeyboardShowSecond(this);">
				<span class="span_title">栏目列表</span>
				<div>
				<span class="spanthree"></span>
				<!-- table list begin -->
				<table border="0px" cellpadding="0px" cellspacing="0px" width="100%">
					<tr class="tablelist">
						<td class="tablelistfirst3r" width="5%">编号</td>
						<td class="tablelistfirst3r" width="53%">栏目名称</td>
						<td class="tablelistfirst3r" width="42%">管理</td>
						</tr>
					<%if(cols!= null){
						String className = "tablelisttext3ro";
						for(int i=0;i<cols.length;i++){%>
					<tr class="tablelist" onmouseout="showThisLinkOut(this);" onmouseover="showThisLinkOver(this);">
							<%className = "tablelisttext3rt";%>
						<td class="<%=className%>"><%=cols[i].getId()%></td>
						<td class="<%=className%>" align="left">
						<a id="col<%=i%>" href="javascript:treeDiv(<%=cols[i].getId()%>,'col','TreePage');" style="font-weight:bold;">
						<img src="<%=request.getContextPath()%>/img/tree/base.gif" border="0px"/><%=cols[i].getName()%></a></td>
					    <td class="<%=className%>">
					       	<a href="<%=request.getContextPath()%>/MainCtrl?page=PreviewPage&col_id=<%=cols[i].getId()%>&is_popup=true" target="_blank">预览</a>
                            <%if(cols[i].getColType()!=Constant.EXTERNAL_LINK_CLOUMN){%>
                            <a href="javascript:exeRequest(rootUrl+'/MainCtrl?page=StaticPage&col_id=<%=cols[i].getId()%>',rightDivContent);">发布</a>
					       	<a href="<%=request.getContextPath()%>/MainCtrl?page=ViewPage&col_id=<%=cols[i].getId()%>&is_popup=true" target="_blank">查看</a>
                            <%}%>
				       		<a href="javascript:exeRequest(rootUrl+'/MainCtrl',rightDivContent,'page=ShowColEditPage&colId=<%=cols[i].getId()%>');">编辑</a>
				       		 <%if(cols[i].getParentid()!=Constant.TOP_CLOUMN_TREE){%>
				       		 <a href="javascript:delColumn(<%=cols[i].getId()%>);">删除</a>
				       		 <%}%>
				       		<a href="javascript:exeRequest(rootUrl+'/MainCtrl', rightDivContent, 'page=ShowColEditPage&parentId=<%=cols[i].getId()%>');">添加</a>
                            <%if(cols[i].getColType()==Constant.ARTICLES_CLOUMN){%>
                            <%if(userInfo.getName().equals(Constant.SUPER_USER) || userInfo.getName().equals(Constant.CHIEF_EDITOR) || userInfo.isArticleRole()){%>
                            <a href="#" onclick="changeSheet('/MainCtrl?page=ColLeftPage&parentId=1','/MainCtrl?page=ArticleManagePage&column_id=<%=cols[i].getId()%>','文章编辑',$('menu_sheet_1'));">
                            	文章管理</a><%}}%>
                            <%if(userInfo.getName().equals(Constant.SUPER_USER) || userInfo.getName().equals(Constant.CHIEF_EDITOR) || userInfo.isPublishRole()){%>
                            <a href="javascript:staticColumnsHtml(<%=cols[i].getId()%>,true);">发布所有</a><%}%>
				       </td>
					</tr>
                    <tr class="tablelist">
                    	<td colspan="5">
	                    	<div id="col<%=cols[i].getId()%>"></div>
                    	</td>
                    </tr>	
					<%}}%>
				</table>
				<!-- table list end -->
				</div>
			</div>
		<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> 
		<!--keboardfirst end-->	
	</div>
	<!--submitbutton begin-->	
	<span><input class="submitbutton" type="button" onclick="exeRequest(rootUrl+'/jsp/inc/welcome.jsp', rightDivContent);"  value="返回"></input></span>

	<!--submitbutton end-->
</div>
<!--maindiv end-->

